<?php

namespace App\Policies;

use App\model\Workshop;
use App\User;
use Illuminate\Auth\Access\HandlesAuthorization;

class WorkshopPolicy
{
    use HandlesAuthorization;

    /**
     * Create a new policy instance.
     *
     * @return void
     */
    public function __construct()
    {
        //
    }
    /**
     * 确定用户是否可以更新盘源。
     * @param  \App\User  $user
     * @param  \App\Post  $post
     * @return bool
     */
    public function update(User $user, Workshop $disksource)
    {
        return true;
    }
    /**
     * 审核
     */
     public function shenhe(User $user,Workshop $workshop){
        return $workshop->shenhe_role_id=$user->role_id;
     }
    /**
     * 审核拒绝
     */
    public function  refuse(User $user,Workshop $workshop){

        return true;
    }
    /**
     * @param User $user
     * @return bool
     */
    public function created(User $user)
    {
        return true;
    }
    /**
     *
     */
    public function viewOner(){

    }
}
